package com.uusee.shipshape.bk.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.annotations.Proxy;

/**
 * 百科信息来源表对应Model。
 * 
 * @author <a href="mailto:wangruibj@hotmail.com">WangRui</a>
 *
 */
@Entity
@Table(name = "ss_bk_baike_source")
@SequenceGenerator(name = "baike_source_sq", sequenceName = "ss_bk_baike_source_sq", allocationSize = 1)
public class BaikeSource {
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "baike_source_sq")
	private long id;
	@Column(name = "baike_id")
	private long baikeId;
	@Column(name = "source_site")
	private String sourceSite;
	@Column(name = "ori_id")
	private String oriId;
	@Column(name = "update_user")
	private String updateUser;
	@Column(name = "update_date")
	private Date updateDate;
	
	
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public long getBaikeId() {
		return baikeId;
	}
	public void setBaikeId(long baikeId) {
		this.baikeId = baikeId;
	}
	public String getSourceSite() {
		return sourceSite;
	}
	public void setSourceSite(String sourceSite) {
		this.sourceSite = sourceSite;
	}
	public String getOriId() {
		return oriId;
	}
	public void setOriId(String oriId) {
		this.oriId = oriId;
	}
	public String getUpdateUser() {
		return updateUser;
	}
	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}
	public Date getUpdateDate() {
		return updateDate;
	}
	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((oriId == null) ? 0 : oriId.hashCode());
		result = prime * result + ((sourceSite == null) ? 0 : sourceSite.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BaikeSource other = (BaikeSource) obj;
		if (oriId == null) {
			if (other.oriId != null)
				return false;
		} else if (!oriId.equals(other.oriId))
			return false;
		if (sourceSite == null) {
			if (other.sourceSite != null)
				return false;
		} else if (!sourceSite.equals(other.sourceSite))
			return false;
		return true;
	}
	
	
	

}
